<#include "../common/layout.ftl"/>
<@layout>
<div class="well">
	<span class="label label-success">新增扣款记录</span>
	<form id="form1" class="well form-horizontal" action="/company/addDedut"  method="post">
	<input type="hidden" name="companyid" value="${tel.id }"/>
	  <table  class="control-group">
	     <tr>
	        <td><label class="control-label" for="focusedInput">公司名称：</label></td>
	        <td>${tel.companyname }</td>
	     </tr>
	     <tr>
	        <td><label class="control-label" for="focusedInput">扣款金额：</label></td>
	        <td>
	            <input class="input-xlarge focused" name="dedut" id="dedut"></input>
	        </td>
	     </tr>
	     <tr>
	        <td><label class="control-label" for="focusedInput">备注：</label></td>
	        <td>
	            <input class="input-xlarge focused" name="remark" id="remark"></input>
	        </td>
	     </tr>
     </table>
     <div class="form-actions">
        <button type="button" class="btn btn-primary" name="save" id="save">确 定</button>
        <button type="reset" class="btn">重 置</button>
        <button type="button" class="btn btn-info" onclick="javascript:history.back();">返回</button>
     </div>
  </form>
  </div>
<script>
$(document).ready(function(){ 
	$('#save').click(function(){
		if($.trim($('#dedut').val())==''){
			alert("扣款金额不可为空");
			return;
		}
		if(isNaN($("#dedut").val())){
			alert("扣款金额必须为数字");
			return;
		}

		$('#form1').submit();
	});
});
</script>
</@layout>